package com.huihui.adapter;

import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.huihui.R;
import com.huihui.widget.NoScrollGridView;
import com.huihui.widget.PartColorTextView;

import java.util.HashMap;
import java.util.Map;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 *
 * Created by Administrator on 2018/8/19.
 */
public class MyRecycleHolder extends RecyclerView.ViewHolder {

    private View mView;
//    private SparseArray<View> mViews;
    private Map<Integer,View> mViews;

    public MyRecycleHolder(View itemView) {
        super(itemView);
        this.mView = itemView;
//        mViews = new SparseArray<>();
        mViews = new HashMap<>();
    }
    public View getView(int id){
        View v = mViews.get(id);
        if(v == null){
            v = mView.findViewById(id);
            mViews.put(id,v);
        }
        return v;
    }
}
